/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package sdc.strategy.substitute;

import sdc.Address;
import sdc.component.type.ComponentType;
import sdc.msg.construct.AddressRequestMessage;
import sdc.net.server.appli.ApplicationServer;

/**
 *
 * @author yokoe
 */
public class FindSubstituteStrategy implements SubstituteStrategy{

	@Override
	public void decideSubstitute(ApplicationServer applicationServer, ComponentType componentType, Address searchAddress) {
		applicationServer.getMessageSender().sendMessage(new AddressRequestMessage(applicationServer.getAddress(), searchAddress, componentType));
	}

}
